<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>插件列表</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script type="text/javascript" src="/PHPUnion/Home/Lib/Pintuer/jquery-1.11.0.js"></script>
<link rel="stylesheet" type="text/css" href="/PHPUnion/Home/Lib/Pintuer/pintuer.css" />
<script type="text/javascript" src="/PHPUnion/Home/Lib/Pintuer/pintuer.js"></script>
<script type="text/javascript" src="/PHPUnion/Home/Lib/Pintuer/respond.js"></script>
</head>
<body>
	<div class="container-layout">
		<!-- 导航位置 -->
		<div class="text-small text-gray height-big">
			<div class="float-left height">
				<span class="icon-home"></span>
				当前位置： 首页 -> 扩展管理 -> 插件列表
			</div>
			<div class="float-right">
				<div class="radius-rounded height">
					<button type="button" onClick="location.href='<?php echo U('index');?>'" class="button radius-none bg-sub">
						<i class="icon-th-list"></i>
						插件列表
					</button>
					<button type="button" onClick="location.href='<?php echo U('create');?>'" class="button radius-none">
						<i class="icon-edit"></i>
						创建插件
					</button>
					<button type="button" onClick="location.href='#'" class="button bg-main radius-none">
						<i class="icon-edit"></i>
						导入插件
					</button>
				</div>
			</div>
			<div class="clearfix"></div>
		</div>
		<hr />
		<!-- 导航位置 End -->
		<table class="table table-bordered table-hover table-condensed table-responsive">
			<tr class="bg">
				<td>名 称</td>
				<td width="150">标 识</td>
				<td>描 述</td>
				<td>安 装</td>
				<td>作 者</td>
				<td>版 本</td>
				<td width="300">操 作</td>
			</tr>
			<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
					<td><?php echo ($vo["title"]); ?></td>
					<td><?php echo ($vo["name"]); ?></td>
					<td><?php echo ($vo["description"]); ?></td>
					<td><?php echo (int_to_status($vo["status"])); ?></td>
					<td><?php echo ($vo["author"]); ?></td>
					<td><?php echo ($vo["version"]); ?></td>
					<td>
						<?php if(($vo["status"]) == "1"): ?><a href="<?php echo U('config', array('id'=>$vo['id']));?>">
								<i class="icon-gear (alias)"></i>
								配置
							</a> |
							<?php else: endif; ?>
						<?php if(($vo["status"]) == "99"): ?><a href="<?php echo U('install',array('addon_name' => $vo['name']));?>">
								<i class="icon-dashboard (alias)"></i>
								安装
							</a> |
							<a href="<?php echo U('DelAddons',array('plugin_name'=>$vo['name']) );?>">
								<i class="icon-trash-o"></i>
								删除
							</a> |
							<?php else: ?>
							<?php if(($vo["status"]) == "1"): ?><a  href="<?php echo U('disable',array('id'=>$vo['id']));?>">
									<i class="icon-unlock-alt"></i>
									禁用
								</a> |
								<?php else: ?>
								<a href="<?php echo U('enable',array('id'=>$vo['id']));?>">
									<i class="icon-unlock"></i>
									启用
								</a> |<?php endif; ?>
							<a href="<?php echo U('uninstall',array('id'=>$vo['id']) );?>">
								<i class="icon-wrench"></i>
								卸载
							</a> |<?php endif; ?>
						<a href="<?php echo U('pluginExportHandle',array('plugin_name' => $vo['name'],'version'=> $vo['version']));?>">
							<i class="icon-print"></i>
							导出
						</a>
					</td>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		</table>
	</div>
	<div class="container-layout">
		<div class="bg border padding margin-large-top"><?php echo ($field["install"]); ?></div>
		<table class="table table-bordered table-hover table-condensed table-responsive">
			<tr>
				<td>插件名</td>
				<td>插件标识</td>
				<td>作 者</td>
				<td>版 本</td>
				<td>描 述</td>
				<td>操 作</td>
			</tr>
			<?php if(is_array($install)): $i = 0; $__LIST__ = $install;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
					<td><?php echo ($vo["title"]); ?></td>
					<td><?php echo ($vo["name"]); ?></td>
					<td><?php echo ($vo["author"]); ?></td>
					<td><?php echo ($vo["version"]); ?></td>
					<td><?php echo ($vo["description"]); ?></td>
					<td width="300">
						<a href="<?php echo ($vo["url"]); ?>">
							 <i class="icon-credit-card"></i>
							控制面板
						</a>
					</td>
				</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		</table>
	</div>
</body>
</html>